package com.my.study.redisson.register.health;

import com.my.study.redisson.register.RegisterContext;

/**
 * @author: yidujun
 * @create: 2021/11/23 20:28
 */
public abstract class AbstractRegisterHealth implements RegisterHealth {
    protected RegisterContext registerContext;

    public AbstractRegisterHealth(RegisterContext registerContext) {
        this.registerContext = registerContext;
    }

    @Override
    public void heartbeat() {
        doHeartbeat();
    }

    /**
     * 心跳检测
     */
    protected abstract void doHeartbeat();
}
